package com.rth.vedio.application.controller;

import com.rth.common.entity.Result;
import com.rth.vedio.infra.entity.UserInfo;
import com.rth.vedio.infra.rpc.UserRpc;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/vedio/")
@Slf4j
public class FeignTestController {

    @Resource
    private UserRpc userRpc;

    @GetMapping("/testFeign")
    public Result feignTest(){

        UserInfo userInfo = userRpc.getUserInfo("黄明昊");
        return Result.ok(userInfo);

    }

}
